Boolean parameters are often harder to grasp, in particular when
there are multiple. So before adding more optional flags to
`_addTransition()`, pass flags as a params object.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3740>
}
}
- _addTransition(oldState, newState, wallTimeSecs, recalculateState = true) {
+ _addTransition(oldState, newState, wallTimeSecs,
+ {recalculateState = true} = {}) {
this._stateTransitions.push({
oldState,
newState,
this._addTransition(
entry['oldState'],
entry['newState'],
- entry['wallTimeSecs'],
- i === history.length - 1);
+ entry['wallTimeSecs'], {
+ recalculateState: i === history.length - 1,
+ });
previousWallTimeSecs = entry['wallTimeSecs'];
}